<template>
  <div v-loading="loading">
    <div class="home-new-backstage">
      <div class="box-home-new"></div>
      <div class="index-left-view">
        <div class="index-left">
          <index-left></index-left>
        </div>
        <div class="index-right">
          <div v-if="$route.path == '/backstage'">
            <div class="backstage">
              <div class="icom-span">
                <i class="el-icon-s-home"></i>
                <span>当前位置 : </span>
                <span class="home-page" @click="homePage">首页</span>
              </div>
            </div>
          </div>
          <div v-else>
            <router-view></router-view>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import indexLeft from "./acpetArrirce/IndexLeft.vue";
export default {
  data() {
    return {
      loading: false, // 用来测试接口
      active: true,
    };
  },
  methods: {
    homePage() {
      if (this.$route.path == "/backstage") return;
      else this.$route.push({ path: "/backstage" });
    },
  },
  components: {
    indexLeft,
  },
};
</script>

<style lang='scss'>
body {
  padding: 0;
  margin: 0;
}
.home-new-backstage {
  .box-home-new {
  }
  .index-left-view {
    display: flex;
    .index-left {
      width: 300px;
    }
    .index-right {
      flex: 3;
    }
  }
  .backstage {
    height: 100px;
    width: 100%;
    background: #ffffff;
    box-shadow: 2px 2px 4px #f5f5f5;
    line-height: 100px;
    .icom-span {
      margin-left: 30px;
      .el-icon-s-home {
        margin-right: 10px;
      }
      .home-page {
        color: #666;
        cursor: pointer;
      }
    }
  }
}
</style>
